import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/Indexs'
import user from '@/components/user'
import ninewei from '@/components/ninewei'
import nineweiNR from '@/components/nineweiNR'
import rengou from '@/components/rengou'
import hehuoren from '@/components/hehuoren'
import money from '@/components/money'
import cangxi from '@/components/cangxi'
import tsgrz from '@/components/tsgrz'
import shopXQ from '@/components/shopXQ'
import spxq from '@/components/spxq'
import areaVue from '@/components/ntarea'
import shopping from '@/components/shopping'
import Login from '@/components/login'
import pwxg from '@/components/pwxg'
import myaddress from '@/components/myaddress'
import addresslist from '@/components/addresslist'
import addressGl from '@/components/addressGl'
import nAddress from '@/components/naddress'
import cspw from '@/components/cspw'
import shopDd from '@/components/shopDd'
import taqing from '@/components/taqing'
import smmg from '@/components/smmg'
import yangsheng from '@/components/yangsheng'
import payrequet from '@/components/payrequet'
import paytel from '@/components/pay-picker/payTel'
import payview from '@/components/pay-picker/payview'
import paysucs from '@/components/pay-picker/paysucs'
import myorder from '@/components/myorder'
import orderall from '@/components/order-group/orderall'
import orderpay from '@/components/order-group/orderpay'
import orderfa from '@/components/order-group/orderfa'
import ordershou from '@/components/order-group/ordershou'
import orderover from '@/components/order-group/orderover'
import orderxq from '@/components/order-group/orderxq'
import refund from '@/components/order-group/refund'
import refundju from '@/components/order-group/refundju'
import refundxq from '@/components/order-group/refundXQ'
import ordermjly from '@/components/order-group/ordermjly'
import orderpj from '@/components/order-group/orderpj'
import orderpjxq from '@/components/order-group/orderpjxq'
import ntlogistics from '@/components/order-group/ntlogistics'
import discount from '@/components/user-group/discount'
import discountlq from '@/components/user-group/discountlq'
import discountlq1 from '@/components/user-group/discountlq1'
import collection from '@/components/user-group/collection'
import exorder from '@/components/user-group/extensionorder'
import perdata from '@/components/user-group/personaldata'
import wssj from '@/components/user-group/wssj'
import qingxie from '@/components/activity/qingxie'
import cyds from '@/components/activity/cyds'
import fengshou from '@/components/activity/fengshou'
import invitecode from '@/components/user-group/invitecode'
import playdishb from '@/components/user-group/playdiscounthb'
import playdisyhq from '@/components/user-group/playdiscountyhq'
import refundshouh from '@/components/user-group/refundshouh'
import business from '@/components/business-group/business'
import shopapply from '@/components/business-group/shopapply'
import businessx from '@/components/business-group/businessx'
import bindphone from '@/components/user-group/bindingphone'
import businests from '@/components/business-group/businessstatus'
import businesind from '@/components/business-group/businessindex'
import shopgl from '@/components/business-group/shopgl'
import ordergl from '@/components/business-group/ordergl'
import busisz from '@/components/business-group/busshezhi'
import shopindex from '@/components/business-group/shopindex'
import shoparea from '@/components/business-group/shoparea'
import ptkf from '@/components/information/ptkf'
import dianpuxq from '@/components/business-group/dianpuxq'
import withdraw from '@/components/withdrawcash/withdraw'
import bankcard from '@/components/withdrawcash/bankcard'
import zhifubao from '@/components/withdrawcash/zhifubao'
import zhifubaogl from '@/components/withdrawcash/zhifubaogl'
import bankcardgl from '@/components/withdrawcash/backcardgl'
import newzhifubao from '@/components/withdrawcash/newzhifubao'
import newbank from '@/components/withdrawcash/newbank'
import tixianmingxi from '@/components/withdrawcash/tixianmingxi'
import seachall from '@/components/seachall'
import characteristic from '@/components/characteristic/characteristic'
import characteristiclist from '@/components/characteristic/characteristiclist'
import seachall1 from '@/components/characteristic/seachall1'
import seachall2 from '@/components/characteristic/seachall2'
import seachall3 from '@/components/characteristic/seachall3'
import seachall4 from '@/components/characteristic/seachall4'
import seachall5 from '@/components/characteristic/seachall5'
import seachall6 from '@/components/characteristic/seachall6'
import seachall7 from '@/components/characteristic/seachall7'
import seachall8 from '@/components/characteristic/seachall8'
import seachall9 from '@/components/characteristic/seachall9'
import seachall10 from '@/components/characteristic/seachall10'

import informationlist from '@/components/information/informationlist'
import informationxt from '@/components/information/xtinformation'
import tuiguang from '@/components/tuiguang'

Vue.use(Router)


const router=new Router({
	  routes: [
	    {path: '/',name: 'Index',meta:{title:'首页'},component: Index},
	    {path: '/user',name: 'user',meta:{title:'个人中心'},component: user},
	    {path: '/ninewei',name: 'ninewei',meta:{title:'九味食记'},component: ninewei},
	    {path: '/ntarea',name: 'ntarea',meta:{title:'全部分类'},component: areaVue},
	    {path:'/login',name:'login',meta:{title:'登录'},component: Login},
	    {path:'/pwxg',name:'pwxg',meta:{title:'密码修改'},component:pwxg},
	    {path:'/cspw',name:'cspw',meta:{title:'重设密码'},component:cspw},
	    {path: '/shopping',name: 'shopping',meta:{title:'购物车'},component: shopping},
	    {path:'/seachall',name:'seachall',meta:{title:'搜索分类'},component:seachall},
	    {path:'/tuiguang',name:'tuiguang',meta:{title:'我要推广'},component:tuiguang},
	    {path:'/characteristic',name:'characteristic',meta:{title:'特色馆'},component:characteristic},
	    {path:'/characteristiclist',name:'characteristiclist',meta:{title:'特色馆'},component:characteristiclist},
	    {path:'/seachall1',name:'seachall1',meta:{title:'搜索分类'},component:seachall1},
	    {path:'/seachall2',name:'seachall2',meta:{title:'搜索分类'},component:seachall2},
	    {path:'/seachall3',name:'seachall3',meta:{title:'搜索分类'},component:seachall3},
	    {path:'/seachall4',name:'seachall4',meta:{title:'搜索分类'},component:seachall4},
	    {path:'/seachall5',name:'seachall5',meta:{title:'搜索分类'},component:seachall5},
	    {path:'/seachall6',name:'seachall6',meta:{title:'搜索分类'},component:seachall6},
	    {path:'/seachall7',name:'seachall7',meta:{title:'搜索分类'},component:seachall7},
	    {path:'/seachall8',name:'seachall8',meta:{title:'搜索分类'},component:seachall8},
	    {path:'/seachall9',name:'seachall9',meta:{title:'搜索分类'},component:seachall9},
	    {path:'/seachall10',name:'seachall10',meta:{title:'搜索分类'},component:seachall10},
	    {path: '/payrequet',meta:{title:'确认支付'},component: payrequet,
	    	children:[
	    		{path:'',name:'payview',meta:{title:'确认支付'},component:payview},
	    		{path:'paytel',name:'paytel',meta:{title:'支付验证'},component:paytel},
	    		{path:'paysucs',name:'paysucs',meta:{title:'支付成功'},component:paysucs}
	    	]
	 		},
	  	{path:'/myorder',meta:{title:'我的订单'},component:myorder,
	  		children:[
	  			{path:'',name:'orderall',meta:{title:'全部订单'},component:orderall},
	  			{path:'orderpay',name:'orderpay',meta:{title:'待付款'},component:orderpay},
	  			{path:'orderfa',name:'orderfa',meta:{title:'待发货'},component:orderfa},
	  			{path:'ordershou',name:'ordershou',meta:{title:'待收货'},component:ordershou},
	  			{path:'orderover',name:'orderover',meta:{title:'已完成'},component:orderover},
	  			{path:'orderxq',name:'orderxq',meta:{title:'订单详情'},component:orderxq},
	  			{path:'refund',name:'refund',meta:{title:'退款申请'},component:refund},
	  			{path:'refundju',name:'refundju',meta:{title:'拒绝退款说明'},component:refundju},
	  			{path:'refundxq',name:'refundxq',meta:{title:'查看退款详情'},component:refundxq},
	  			{path:'ordermjly',name:'ordermjly',meta:{title:'给卖家留言'},component:ordermjly},
	  			{path:'orderpj',name:'orderpj',meta:{title:'提交评价'},component:orderpj},
	  			{path:'orderpjxq',name:'orderpjxq',meta:{title:'评价详情'},component:orderpjxq},
	  			{path:'ntlogistics',name:'ntlogistics',meta:{title:'物流信息'},component:ntlogistics}
	  		]
	  	},
	    {path:'/nineweiNR/:id',name:'nineweiNR',meta:{title:'九味详情'},component: nineweiNR},
	    {path:'/rengou',name:'rengou',meta:{title:'九味详情'},component: rengou},
	    {path:'/money',name:'money',meta:{title:'分享赚钱'},component: money},
	    {path:'/cangxi',name:'cangxi',meta:{title:'三门青蟹苍溪猕猴桃'},component: cangxi},
	    {path:'/hehuoren',name:'hehuoren',meta:{title:'县域合伙人'},component: hehuoren},
	    {path:'/tsgrz',name:'tsgrz',meta:{title:'特色馆入驻'},component: tsgrz},
	    {path:'/shopXQ/:id',name:'shopXQ',meta:{title:'商品详情页'},component: shopXQ},
	    {path:'/spxq/:id',name:'spxq',meta:{title:'商品详情页'},component: spxq},
	    {path:'/shopDd',name:'shopDd',meta:{title:'订单详情'},component: shopDd},
	    {path:'/taqing',name:'taqing',meta:{title:'农淘优选踏青节'},component: taqing},
	    {path:'/smmg',name:'smmg',meta:{title:'三门甜瓜'},component: smmg},
	    {path:'/yangsheng',name:'yangsheng',meta:{title:'【农淘优选】初夏养生食补'},component: yangsheng},
	    {path:'/playdishb',name:'playdiscounthb',meta:{title:'使用平台红包'},component:playdishb},
	    {path:'/playdisyhq',name:'playdiscountyhq',meta:{title:'使用优惠券'},component:playdisyhq},
	    {path:'/myaddress',component: myaddress,
	    	children:[
	    		{path:'',name:'addresslist',meta:{title:'地址列表'},component:addresslist},
	    		{path:'addressgl',name:'addressgl',meta:{title:'地址管理'},component:addressGl},
	    		{path:'nAddress/:id',name:'nAddress',meta:{title:'添加和修改地址'},component:nAddress}
	    	]
	    },
	    {path:'/discount',name:'discount',meta:{title:'优惠券列表'},component:discount},
		  {path:'/discountlq',name:'discountlq',meta:{title:'领取优惠券和红包'},component:discountlq},
		  {path:'/discountlq1',name:'discountlq1',meta:{title:'领取优惠券和红包'},component:discountlq1},
		  {path:'/collection',name:'collection',meta:{title:'我的收藏'},component:collection},
		  {path:'/exorder',name:'exorder',meta:{title:'推广订单'},component:exorder},
	    {path:'/perdata',name:'perdata',meta:{title:'个人资料'},component:perdata},
			{path:'/wssj',name:'wssj',meta:{title:'我是商家'},component:wssj},
			{path:'/qingxie',name:'qingxie',meta:{title:'三门青蟹节'},component:qingxie},
			{path:'/cyds',name:'cyds',meta:{title:'创业大赛'},component:cyds},
			{path:'/fengshou',name:'fengshou',meta:{title:'丰收节'},component:fengshou},
	    {path:'/invitecode',name:'invitecode',meta:{title:'我的推广码'},component:invitecode},
		  {path: '/refundsh',name: 'refundshouh',meta:{title:'退款/售后'},component: refundshouh},
		  {path: '/bindphone',name: 'bindphone',meta:{title:'绑定手机号'},component: bindphone},
		  {path:'/business',component:business,
		   	children:[
		   		{path:'',name:'shopapply',meta:{title:'申请入驻'},component:shopapply},
		   		{path:'businessx',name:'businessx',meta:{title:'商家信息'},component:businessx},
		   		{path:'businests',name:'businests',meta:{title:'审核进度'},component:businests},
		   		{path:'businesind',name:'businesind',meta:{title:'我是商家'},component:businesind},
		   		{path:'shopgl',name:'shopgl',meta:{title:'商品管理'},component:shopgl},
		   		{path:'ordergl',name:'ordergl',meta:{title:'订单管理'},component:ordergl},
		   		{path:'busisz',name:'busisz',meta:{title:'店铺设置'},component:busisz},
		   		{path:'shopindex',name:'shopindex',meta:{title:'店铺首页'},component:shopindex},
		   		{path:'shoparea',name:'shoparea',meta:{title:'商品编辑'},component:shoparea},
		   		{path:'dianpuxq',name:'dianpuxq',meta:{title:'店铺简介'},component:dianpuxq}
		   	]
		  },
		  {path:'/withdraw',name:'withdraw',meta:{title:'余额提现'},component:withdraw},
		  {path:'/bankcard',name:'bankcard',meta:{title:'提现至银行卡'},component:bankcard},
		  {path:'/zhifubao',name:'zhifubao',meta:{title:'提现至支付宝'},component:zhifubao},
		  {path:'/bankcardgl',name:'bankcardgl',meta:{title:'银行卡管理'},component:bankcardgl},
		  {path:'/zhifubaogl',name:'zhifubaogl',meta:{title:'支付宝管理'},component:zhifubaogl},
		  {path:'/newbank',name:'newbank',meta:{title:'添加银行卡'},component:newbank},
		  {path:'/newzhifubao',name:'newzhifubao',meta:{title:'添加支付宝'},component:newzhifubao},
		  {path:'/tixianmingxi',name:'tixianmingxi',meta:{title:'提现明细'},component:tixianmingxi},
		  {path:'/informationlist',name:'informationlist',meta:{title:'消息'},component:informationlist},
		  {path:'/informationshi',name:'informationshi',component:ptkf},
		  {path:'/informationxt',name:'informationxt',meta:{title:'系统消息'},component:informationxt}
	  ]
})
router.beforeEach((to, from, next) => {
	if (to.meta.title) {
		document.title = to.meta.title
	}
	next()
})
export default router;

